home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of MacTutor - S…e Code for Volumes 1 to 5
/
The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin
/
Source Code
/
#27 (Dec 87)
/
Pascal MIDI shell
/
LSPMIDI
next >
Wrap
Text File
|
1987-07-15
|
3KB
|
108 lines
UNIT LSPMIDI;
INTERFACE
PROCEDURE InitSCCA;
{call this once at the beginning of your application if you are going to use the}
{modem port for MIDI}
PROCEDURE TxMIDIA (TheData : integer);
{use this procedure to transmit a byte of MIDI data through the modem port}
{the MIDI byte is in the lower 8 bits of the word}
FUNCTION RxMIDIA : LongInt;
{use this function to get a byte of MIDI data and the counter value associated}
{with that byte through the modem port}
{the MIDI byte is in the lower 8 bits of the longword}
{the upper 3 bytes of the longword contain the counter value when the byte}
{arrived at the Macintosh}
PROCEDURE MIDIThruA (Thrucode : integer);
{this is for the MIDI thru function}
{the Thrucode variable is as follows:}
{0 = no MIDIThru function}
{1 = MIDIThru on the same channel}
{2 = MIDIThru on the opposite channel}
PROCEDURE ResetSCCA;
{call this procedure when your application is done if you called InitSCCA at}
{the beginning of your application or the system will crash}
PROCEDURE InitSCCB;
{call this once at the beginning of your application if you are going to use the}
{printer port for MIDI}
PROCEDURE TxMIDIB (TheData : integer);
{use this procedure to transmit a byte of MIDI data through the printer port}
{the MIDI byte is in the lower 8 bits of the word}
FUNCTION RxMIDIB : LongInt;
{use this function to get a byte of MIDI data and the counter value associated}
{with that byte through the printer port}
{the MIDI byte is in the lower 8 bits of the longword}
{the upper 3 bytes of the longword contain the counter value when the byte}
{arrived at the Macintosh}
PROCEDURE MIDIThruB (Thrucode : integer);
{this is for the MIDI thru function}
{the Thrucode variable is as follows:}
{0 = no MIDIThru function}
{1 = MIDIThru on the same channel}
{2 = MIDIThru on the opposite channel}
PROCEDURE ResetSCCB;
{call this procedure when your application is done if you called InitSCCB at}
{the beginning of your application or the system will crash}
PROCEDURE InitTimer (TimrValue : integer);
{call this procedure once at the beginning of your application if you are going to}
{make use of time-stamping. 1 millisecond = decimal 782}
PROCEDURE LoadTimer (TimrValue : integer);
{call this procedure if you want to change the interval of time that the counter}
{is incremented. 1 millisecond = decimal 782}
PROCEDURE StartCounter;
{call this procedure to set the counter value to 1}
FUNCTION GetCounter : LongInt;
{call this function to get the current value of the counter}
PROCEDURE QuitTimer;
{call this procedure when your application is done if you called InitTimer at}
{the beginning of your application or the system will crash}
IMPLEMENTATION
{$A+}
PROCEDURE InitSCCA;
external;
PROCEDURE TxMIDIA;
external;
FUNCTION RxMIDIA;
external;
PROCEDURE MIDIThruA;
external;
PROCEDURE ResetSCCA;
external;
PROCEDURE InitSCCB;
external;
PROCEDURE TxMIDIB;
external;
FUNCTION RxMIDIB;
external;
PROCEDURE MIDIThruB;
external;
PROCEDURE ResetSCCB;
external;
PROCEDURE InitTimer;
external;
PROCEDURE LoadTimer;
external;
PROCEDURE StartCounter;
external;
FUNCTION GetCounter;
external;
PROCEDURE QuitTimer;
external;
{$A-}
END.